#ifndef __AFXCOLL_H__
#define __AFXCOLL_H__
#include  "afxwin.h"
#include  "_AFXPLEX_.H"

class CMapPtrToPtr
{
protected:
	struct CAssoc
	{
		CAssoc* pNext;
		void* key;
		void* value;
	};
protected:
	struct CPlex* m_pBlocks;
	int m_nBlockSize;
	CAssoc* m_pFreeList;
	int m_nCount;
	CAssoc* NewAssoc();
	void FreeAssoc(CAssoc* pAssoc);
	CAssoc *GetAssocAt(void* key,UINT& nHash) const;
	CAssoc** m_pHashTable;
	int m_nHashTableSize;
public:
	CMapPtrToPtr(int nBlockSize=10);
	int GetConut()const;
	BOOL IsEmpty() const;
	BOOL LookUp(void* key,void* &rValue);
	void*& operator[](void* key);
	void SetAt(void* key,void* newValue);
	BOOL Removekey(void* key);
	void RemoveAll();
	UINT GetHashTableSize() const;
	void InitHashTable(UINT nHashSize,BOOL bAllowNow=TRUE);
	UINT HashKey(void* key) const;
	~CMapPtrToPtr();
};
#endif